package main

import "fmt"

type Human struct {
	name string
	sex  string
}

func (this *Human) Eat() {
	fmt.Println("human .Eat")
}
func (this *Human) Wakl() {
	fmt.Println("human .Wakl")
}

// 继承
type SuperHuman struct {
	Human //继承
	level int
}

//Eat 从定义父类方法
func (this *SuperHuman) Eat() {
	fmt.Println("SuperHuman .Eat")
}

func main() {

	human := Human{name: "lisi", sex: "M"}
	human.Eat()

	superHuman := SuperHuman{human, 0}
	superHuman.Eat()
	fmt.Println(superHuman.name)
}
